package web.dmt.dao.proxy;

import web.dmt.dao.*;
import web.dmt.dao.impl.*;
import web.dmt.db.Conn;

public class AdminProxy implements AdminDAO{
	private Conn dbc = null ;
	private AdminImpl dao = null ;
	
	public AdminProxy(){
		try{
			this.dbc = new Conn() ;
		}catch(Exception e){
			e.printStackTrace() ;
		}
		this.dao = new AdminImpl(dbc.getConnection()) ;
	}
	public boolean delete(String chart,int id) throws Exception {
		boolean flag = false ;
		try{
			flag = this.dao.delete(chart, id) ;
		}catch(Exception e){
			e.printStackTrace() ;
		}finally{
			this.dbc.close();
		}
		return flag ;
	}

}
